<!--
 * @Description: 修改密码步骤条3
 * @Date:
 * @LastEditTime:
 * @FilePath:
-->
<template>
  <div>
    <el-result icon="success" title="密码修改成功!" sub-title="为确保您账户密码不被泄露,请定期更改密码">
      <template #extra>
        <el-button type="primary" @click="reLogin">重新登陆</el-button>
      </template>
    </el-result>
  </div>
</template>

<script setup lang="ts">
import { reactive } from "vue";
import { useRouter } from "vue-router";
import { useUserStore } from "@/stores/modules/user";
import { LOGIN_URL } from "@/config";

const userStore = useUserStore();
const router = useRouter();
const reLogin = async () => {
  // 清除 Token
  userStore.setToken("");
  // 重定向到登陆页
  router.replace(LOGIN_URL);
};
</script>

<style scoped></style>
